import { BasicColumn, FormSchema } from '@/components/Table/index';

const windowInstanse: any = window;

export const columns: BasicColumn[] = [
  {
    title: '编号',
    dataIndex: 'code',
    width: 150,
    align: 'center',
    sorter: true,
  },
  {
    title: '设备ID',
    dataIndex: 'openId',
    width: 150,
    align: 'center',
    sorter: true,
  },
  {
    title: '短视频链接',
    dataIndex: 'preUrl',
    width: 150,
    align: 'center',
    sorter: true,
  },
  {
    title: '去水印后链接',
    dataIndex: 'afterUrl',
    width: 150,
    align: 'center',
    sorter: true,
  },
  {
    title: '创建时间',
    dataIndex: 'createdTime',
    width: 150,
    align: 'center',
    sorter: true,
  },
];

export const searchFormSchema: FormSchema[] = [
  {
    field: 'keyWord',
    label: '关键字',
    component: 'Input',
    colProps: { span: 6 },
    componentProps: {
      placeholder: '请输入链接',
    },
  },
  {
    field: 'StartEndTime',
    label: '解除时间',
    component: 'RangeDate',
    componentProps: {
      valueFormat: 'YYYY-MM-DD',
      // showTime: true,
      format: 'YYYY-MM-DD',
    },
    colProps: { xl: 8, xxl: 8 },
  },
];
export const formSchema: FormSchema[] = [
  {
    field: 'id',
    label: '',
    component: 'Input',
    show: false,
  },
  {
    field: 'code',
    label: '编号',
    required: true,
    component: 'Input',
    componentProps: {
      placeholder: '请输入编号',
    },
  },
  {
    field: 'openId',
    label: '设备ID',
    required: true,
    component: 'Input',
    componentProps: {
      placeholder: '请输入设备ID',
    },
  },
  {
    field: 'preUrl',
    required: true,
    label: '短视频链接',
    component: 'InputTextArea',
    colProps: { lg: 24, md: 24 },
    componentProps: {
      placeholder: '请输入短视频链接',
    },
  },
  {
    field: 'afterUrl',
    label: '去水印后链接',
    component: 'InputTextArea',
    colProps: { lg: 24, md: 24 },
    componentProps: {
      placeholder: '请输入去水印后链接',
    },
  },
  {
    field: 'remark',
    label: '备注',
    component: 'InputTextArea',
    colProps: { lg: 24, md: 24 },
    componentProps: {
      placeholder: '请输入备注',
    },
  },
];
